package com.tjmc.tiomsresource.service.impl;

import com.tjmc.tiomscore.dao.TranPtnHwMtrMapper;
import com.tjmc.tiomscore.model.TranPtnHwMtr;
import com.tjmc.tiomsresource.parser.CMMtrParser;
import com.tjmc.tiomsresource.service.CMMtrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;

/**
 * @author Luc
 * @version 1.0
 * @date 2020-05-20 15:41
 */
@Service("cmMtrService")
public class CMMtrServiceImpl extends CMSuperServiceImpl<TranPtnHwMtr> implements CMMtrService {

    @Autowired
    private CMMtrParser cmMtrParser;
    @Autowired
    private TranPtnHwMtrMapper tranPtnHwMtrMapper;

    @Override
    public CMMtrParser getParser() {
        return cmMtrParser;
    }

    @Override
    public TranPtnHwMtrMapper getMapper() {
        return tranPtnHwMtrMapper;
    }

    @Override
    public boolean saveTranPtnHwDataToDB(List<File> xmlFiles) {
        return this.saveTranPtnHwDataToDB(xmlFiles, "MTR");
    }
}
